<?php 
	if (isset($_GET['id_admin'])) {
		$data=$this->getEmploy ($_GET['id_admin']);
	}
	else 
		$data = $this->getRequest()->getPost();
?>
<div class="grid_10">
	<div class="box round first fullpage">
		<?php if (isset($_GET['id_admin'])):?>
			<h2>Edit Employee</h2>
		<?php else:?>
			<h2>Add Employee</h2>
		<?php endif;?>
		<div class="block ">
			<form action="<?php echo Epic::getUrl('admin/acc/addEmployee')?>" method="post" enctype="application/x-www-form-urlencoded">
			<table class="form">
				<tbody>
				<tr>
					<td>
						<label>
							User Name
						</label>
					</td>
					<td>
						<?php if (isset($_GET['id_admin'])):?>
							<input type="hidden" class="" name="id_admin" value="<?php echo $_GET['id_admin']?>">
						<?php endif;?>
						<input type="text" class="medium" name="username" value="<?php if(isSet($data['username']))echo($data['username'])?>"><span style= "color :red" > * </span>
					</td>
				</tr>
				<tr>
					<td>
						<label>
							Password
						</label>
					</td>
					<td>
						<input type="password" class="medium" name="password" value="<?php if(isSet($data['password'])) echo($data['password'])?>"><span style= "color :red" > * </span>
					</td>
				</tr>
				<tr>
					<td>
						<label>
							Email 
						</label>
					</td>
					<td>
						<input type="text" class="medium" name="email" value="<?php if(isSet($data['email'])) echo($data['email'])?>"/><span style= "color :red" > * </span>
					</td>
				</tr>
				<tr>
					<td>
						<label>
							First Name 
						</label>
					</td>
					<td>
						<input type="text" class="medium" name="first_name" value="<?php if(isSet($data['first_name'])) echo($data['first_name'])?>"><span style= "color :red" > * </span>
					</td>
				</tr>
				<tr>
					<td>
						<label>
							Last Name 
						</label>
					</td>
					<td>
						<input type="text" class="medium" name="last_name" value="<?php if(isSet($data['last_name'])) echo($data['last_name'])?>"><span style= "color :red" > * </span>
					</td>
				</tr>
				<tr>
					<td style="vertical-align: top; padding-top: 9px;">
						<label>
							</label>
					</td>
					<td>
						<button class="btn" type="submit">Submit</button>
					</td>
				</tr>
				
			</tbody></table>
			</form>
			<a href="<?php echo Epic::getUrl('admin/journal/list');?>"> Back to list </a>
		</div>
	</div>
</div>